@import "config"

_color_set(colors)
  default-hue = get-config-or-default("hue", 0)
  for key, value in colors
    if type(value) == 'ident'
      {key}: var(value)
    else if type(value) == 'rgba'
      {key}: value
  @supports (color: oklch(0 0 0))
    for key, value in colors
      if type(value) == 'unit'
        {key}: oklch(value[0] value[1] var(--primary-hue))
  @supports not (color: oklch(0 0 0))
    for key, value in colors
      if type(value) == 'unit'
        {key}: oklchToHex(value[0], value[1], default-hue)

_type_test(items)
  for key, value in items
    {key}: type(value)
